﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>计算公式生成</title>
    <style>
        body{ margin:0; padding:0; font-family:Arial 宋体; font-size:12px;overflow:hidden;}
       #form{ position:relative;}
        
textarea{border:1px solid #aecaf0;}
input{padding:0;border:#a3c0e8 1px solid; background:#e2f0ff url(/EnterpriseFund/DXR.axd?r=0_54) repeat-x 50% top;color:#2c4d79; cursor:pointer; }
input:hover{background-image:url(/EnterpriseFund/DXR.axd?r=0_57)}

#formula {
    position:absolute;
    left:10px;
    top:10px;
    width:490px;
    height:140px;
} 
#expression {
    position:absolute;
    left:10px;
    top:410px;
    width:490px;
    height:140px; display:none;
}

#items {
    position:absolute;
    left:10px;
    top:160px;
    width:110px;
    height:130px;border:1px solid #aecaf0;
}

#u1 {
    position:absolute;
    left:170px;
    top:160px;
    width:30px;
    height:25px;
}

#u2 {
    position:absolute;
    left:370px;
    top:160px;
    width:60px;
    height:25px;
}

#u3 {
    position:absolute;
    left:370px;
    top:195px;
    width:60px;
    height:25px;
}

#u4 {
    position:absolute;
    left:170px;
    top:195px;
    width:30px;
    height:25px;
}

#u5 {
    position:absolute;
    left:170px;
    top:230px;
    width:30px;
    height:25px;
}

#u6 {
    position:absolute;
    left:170px;
    top:265px;
    width:30px;
    height:25px;
}

#u7 {
    position:absolute;
    left:250px;
    top:160px;
    width:30px;
    height:25px;
}

#u8 {
    position:absolute;
    left:250px;
    top:195px;
    width:30px;
    height:25px;
}

#u9 {
    position:absolute;
    left:250px;
    top:230px;
    width:30px;
    height:25px;
}

#u10 {
    position:absolute;
    left:250px;
    top:265px;
    width:30px;
    height:25px;
}

#u11 {
    position:absolute;
    left:290px;
    top:160px;
    width:30px;
    height:25px;
}

#u12 {
    position:absolute;
    left:290px;
    top:195px;
    width:30px;
    height:25px;
}

#u13 {
    position:absolute;
    left:290px;
    top:230px;
    width:30px;
    height:25px;
}

#u14 {
    position:absolute;
    left:330px;
    top:160px;
    width:30px;
    height:25px;
}

#u15 {
    position:absolute;
    left:330px;
    top:195px;
    width:30px;
    height:25px;
}

#u16 {
    position:absolute;
    left:330px;
    top:230px;
    width:30px;
    height:25px;
}

#u17 {
    position:absolute;
    left:440px;
    top:265px;
    width:60px;
    height:25px;  
    color:#009900;
}

#u18 {
    position:absolute;
    left:340px;
    top:265px;
    width:20px;
    height:25px;
}

#u19 {
    position:absolute;
    left:130px;
    top:160px;
    width:30px;
    height:25px;
}

#u20 {
    position:absolute;
    left:130px;
    top:195px;
    width:30px;
    height:25px;
}

#u21 {
    position:absolute;
    left:130px;
    top:230px;
    width:30px;
    height:25px;
}

#u22 {
    position:absolute;
    left:130px;
    top:265px;
    width:30px;
    height:25px;
}

#u23 {
    position:absolute;
    left:210px;
    top:160px;
    width:30px;
    height:25px;
}

#u24 {
    position:absolute;
    left:290px;
    top:265px;
    width:40px;
    height:25px;
}

#u25 {
    position:absolute;
    left:370px;
    top:230px;
    width:60px;
    height:25px;
}

#u26 {
    position:absolute;
    left:370px;
    top:265px;
    width:60px;
    height:25px;
}

#u27 {
    position:absolute;
    left:440px;
    top:230px;
    width:60px;
    height:25px;
    color:#990000;
}

#u28 {
    position:absolute;
    left:440px;
    top:195px;
    width:60px;
    height:25px;
}

#u30 {
    position:absolute;
    left:440px;
    top:160px;
    width:60px;
    height:25px;
}


    </style>
</head>
<body class="compute">
<div id="form">
      
<textarea id="formula"  ></textarea>

<select id="items" multiple="multiple"   >
<option  value="[se]"> 税款 </option>
</select>

<input id=u1 type="button"  value=" ( "  >

<input id=u2 type="button"  value=" 如果 "  >

<input id=u3 type="button"  value=" 否则 "  >

<input id=u4 type="button"  value=" &gt; "  >

<input id=u5 type="button"  value=" &lt; "  >

<input id=u6 type="button"  value=" = "  >

<input id=u7 type="button"  value="1"  >

<input id=u8 type="button"  value="4"  >

<input id=u9 type="button"  value="7"  >

<input id=u10 type="button"  value="0"  >

<input id=u11 type="button"  value="2"  >

<input id=u12 type="button"  value="5"  >

<input id=u13 type="button"  value="8"  >

<input id=u14 type="button"  value="3"  >

<input id=u15 type="button"  value="6"  >

<input id=u16 type="button"  value="9"  >

<input id=u17 type="button"  value="确定"  >

<input id=u18 type="button"  value="."  >

<input id=u19 type="button"  value=" + "  >

<input id=u20 type="button"  value=" - "  >

<input id=u21 type="button"  value=" * "  >

<input id=u22 type="button"  value=" / "  >

<input id=u23 type="button"  value=" ) "  >

<input id=u24 type="button"  value="000"  >

<input id=u25 type="button"  value=" 并且 "  >

<input id=u26 type="button"  value=" 或者 "  >

<input id=u27 type="button"  value="取消"  >

<input id=u28 type="button"  value="清空"  >

<input id=u30 type="button"  value=" 则 "  >

<textarea id="expression" ></textarea>
  
</div>
</body>
</html>
<script>
    var parentDoc = parent.document;
    if (parent.IsEvalBase.GetValue()) {
        addItem('[base]', '基数');
        addItem('[rateIn]', '基数内补贴率');
        addItem('[rateOut]', '基数外补贴率(补贴率)');
    }
    else {
//        var rates = parentDoc.getElementById('rates').value;
//        var arr = rates.split(',');
//        for (var i = 0; i < arr.length; i++) {
//            addItem('[rate' + (i + 1) + ']', '第' + (i + 1) + '段补贴率:' + arr[i]);
//        }
        addItem('[rateOut]', '补贴率');
    }

    function addItem(value, text) {
        var select = document.getElementById('items');
        var newItem = document.createElement("option");
        newItem.setAttribute("value", value);
        var t = document.createTextNode(text);
        newItem.appendChild(t);
        select.appendChild(newItem);
    }

</script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/formula.js")" type="text/javascript"></script>
